package com.csun.cmny.provider.service;

import com.csun.cmny.base.dto.LoginAuthDto;
import com.csun.cmny.core.support.IService;
import com.csun.cmny.provider.model.domain.DmcCsunBodySensorLocation;
import com.csun.cmny.provider.model.dto.bodysensor.BindCsunBodySensorLocationDto;
import com.csun.cmny.provider.model.dto.bodysensor.CsunBodySensorPageQuery;
import com.csun.cmny.provider.model.dto.propertyManagement.SelectDeviceDataDto;
import com.csun.cmny.provider.model.vo.BodySensorReqVo;
import com.csun.cmny.provider.model.vo.csunbody.DmcCsunBodySensorVo;
import com.csun.cmny.provider.model.vo.life.DmcDeviceByRoom;
import com.csun.cmny.provider.model.vo.propertyManagement.PropertyDataVo;
import com.github.pagehelper.PageInfo;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * @Auther: chisj chisj@foxmal.com
 * @Date: 2019-02-11 20:07
 * @Description: the interface dmc csun body sensor location service
 */
public interface DmcCsunBodySensorLocationService extends IService<DmcCsunBodySensorLocation> {

    /**
     * bind csun body sensor location
     *
     * @param bindCsunBodySensorLocationDto bind csun body sensor location dto
     * @param loginAuthDto                  login auth dto
     *
     * @return  the int.
     */
    Integer bindCsunBodySensorLocation(BindCsunBodySensorLocationDto bindCsunBodySensorLocationDto,
                                       LoginAuthDto loginAuthDto);

    /**
     * break csun body sensor location
     *
     * @param deviceId  device id
     *
     * @return  the int.
     */
    Integer breakCsunBodySensorLocation(Long deviceId);

    /**
     * query csun body sensor list page
     *
     * @param csunBodySensorPageQuery   csun body sensor page query
     *
     * @return  the page info.
     */
    PageInfo queryGroupBodySensorListWithPage(CsunBodySensorPageQuery csunBodySensorPageQuery);

    /**
     * get csun body sensor by device id
     *
     * @param deviceId  device id
     *
     * @return  dmc csun body sensor vo
     */
    DmcCsunBodySensorVo getCsunBodySensorByDeviceId(Long deviceId);

    /**
     * get csun body sensor by device id
     *
     * @param deviceNo  device no
     *
     * @return  dmc csun body sensor vo
     */
    DmcCsunBodySensorVo getCsunBodySensorByDeviceNo(String deviceNo);

    /**
     * get csun body sensor by room id
     *
     * @param roomId    room id
     *
     * @return  the list.
     */
    List<DmcCsunBodySensorVo> getCsunBodySensorByRoomId(Long roomId);

    /**
     * delete body sensor by id
     *
     * @param id    id
     *
     * @return  the int.
     */
    Integer deleteBodySensorById(Long id);
    /**
     * @description: TODO
     * @param: oldmanId 老人ID
     * @return:
     * @throws
     * @author huangxm
     * @date 2019/3/15 13:39
     */
    Map<String,Object> getRecentData(@Param("oldmanId")Integer oldmanId);

    /**
     * query body sensor location by room id list
     *
     * @param roomIdList    room id list
     *
     * @return  the list.
     */
    List<BodySensorReqVo> queryBodySensorLocationByRoomIds(List<Integer> roomIdList);

    /**
     *
     * @param alertId
     * @return
     */
    DmcDeviceByRoom selectRoomIdByDeviceId(Long alertId);

    List<PropertyDataVo> selectDeviceData(SelectDeviceDataDto selectDeviceDataDto);
}
